7fa815
@@ -276,7 +276,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
         sfb.setInInterceptors(in);
         sfb.setOutInterceptors(out);
         sfb.setOutFaultInterceptors(outFault);
-        sfb.setInFaultInterceptors(inFault); 
+        sfb.setInFaultInterceptors(inFault);
         sfb.setFeatures(features);
         if (schemaLocations != null) {
             sfb.setSchemaLocations(schemaLocations);
@@ -284,15 +284,15 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
         if (bindingConfig != null) {
             sfb.setBindingConfig(bindingConfig);
         }
-        
+
         if (dataBinding != null) {
             sfb.setDataBinding(dataBinding);
         }
-        
+
         if (serviceFactoryBean != null) {
             setServiceFactory(sfb, serviceFactoryBean);
         }
-        
+
         if (sfb instanceof JaxWsServerFactoryBean && handlers != null) {
             ((JaxWsServerFactoryBean)sfb).setHandlers(handlers);
         }
@@ -302,7 +302,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
         if (getBindingId() != null) {
             sfb.setBindingId(getBindingId());
         }
-        
+
         // wsdl url
         if (getWsdlURL() != null) {
             sfb.setWsdlURL(getWsdlURL());
@@ -369,14 +369,14 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
         }
         if (this.isSkipPayloadMessagePartCheck()) {
             if (sfb.getProperties() == null) {
-                sfb.setProperties(new HashMap<String, Object>());                
+                sfb.setProperties(new HashMap<String, Object>());
             }
             sfb.getProperties().put("soap.no.validate.parts", Boolean.TRUE);
         }
-        
+
         if (this.isSkipFaultLogging()) {
             if (sfb.getProperties() == null) {
-                sfb.setProperties(new HashMap<String, Object>());                
+                sfb.setProperties(new HashMap<String, Object>());
             }
             sfb.getProperties().put(FaultListener.class.getName(), new NullFaultListener());
         }
@@ -426,7 +426,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
         for (Method m : cf.getClass().getMethods()) {
             if ("setServiceFactory".equals(m.getName())) {
                 try {
-                    // Set Object class as the service class of WSDLServiceFactoryBean 
+                    // Set Object class as the service class of WSDLServiceFactoryBean
                     ReflectionUtil.setAccessible(m).invoke(cf, new WSDLServiceFactoryBean(Object.class));
                 } catch (Exception e) {
                     throw new RuntimeException(e);
@@ -436,7 +436,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
         return cf;
     }
 
-    protected void setupHandlers(ClientFactoryBean factoryBean, Client client) 
+    protected void setupHandlers(ClientFactoryBean factoryBean, Client client)
         throws Exception {
 
         if (factoryBean instanceof JaxWsClientFactoryBean && handlers != null) {
@@ -484,15 +484,15 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
         factoryBean.setFeatures(features);
         factoryBean.setTransportId(transportId);
         factoryBean.setBindingId(bindingId);
-        
+
         if (bindingConfig != null) {
             factoryBean.setBindingConfig(bindingConfig);
         }
-        
+
         if (dataBinding != null) {
             factoryBean.setDataBinding(dataBinding);
         }
-        
+
         if (serviceFactoryBean != null) {
             setServiceFactory(factoryBean, serviceFactoryBean);
         }
@@ -541,7 +541,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
         if (getWrappedStyle() != null) {
             setWrapped(factoryBean, getWrappedStyle());
         }
-        
+
         // any optional properties
         if (getProperties() != null) {
             if (factoryBean.getProperties() != null) {
@@ -552,7 +552,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
             }
             LOG.debug("ClientFactoryBean: {} added properties: {}", factoryBean, getProperties());
         }
-        
+
         // setup the basic authentication property
         if (ObjectHelper.isNotEmpty(username)) {
             AuthorizationPolicy authPolicy = new AuthorizationPolicy();
@@ -563,17 +563,17 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
             }
             factoryBean.getProperties().put(AuthorizationPolicy.class.getName(), authPolicy);
         }
-        
+
         if (this.isSkipPayloadMessagePartCheck()) {
             if (factoryBean.getProperties() == null) {
-                factoryBean.setProperties(new HashMap<String, Object>());                
+                factoryBean.setProperties(new HashMap<String, Object>());
             }
             factoryBean.getProperties().put("soap.no.validate.parts", Boolean.TRUE);
         }
-        
+
         if (this.isSkipFaultLogging()) {
             if (factoryBean.getProperties() == null) {
-                factoryBean.setProperties(new HashMap<String, Object>());                
+                factoryBean.setProperties(new HashMap<String, Object>());
             }
             factoryBean.getProperties().put(FaultListener.class.getName(), new NullFaultListener());
         }
@@ -642,8 +642,8 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
         } else {
             // create the client without service class
 
-            checkName(portName, "endpoint/port name");
-            checkName(serviceName, "service name");
+            checkName(getPortName(), "endpoint/port name");
+            checkName(getServiceName(), "service name");
 
             ClientFactoryBean factoryBean = createClientFactoryBean();
             // setup client factory bean
@@ -667,14 +667,14 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
         if (getDataFormat() == DataFormat.POJO) {
             ObjectHelper.notNull(getServiceClass(), CxfConstants.SERVICE_CLASS);
         }
-        
+
         if (getWsdlURL() == null && getServiceClass() == null) {
             // no WSDL and serviceClass specified, set our default serviceClass
             if (getDataFormat().equals(DataFormat.PAYLOAD)) {
                 setServiceClass(org.apache.camel.component.cxf.DefaultPayloadProviderSEI.class.getName());
             }
         }
-        
+
         if (getServiceClass() != null) {
             cls = getServiceClass();
         }
@@ -826,7 +826,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
                 if (definition.getServices().size() == 1) {
                     serviceName = (QName) definition.getServices().keySet()
                         .iterator().next();
-                    
+
                 }
             } catch (WSDLException e) {
                 throw new RuntimeException(e);
@@ -1029,7 +1029,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
     public Map<String, Object> getProperties() {
         return properties;
     }
-    
+
     public void setCamelContext(CamelContext c) {
         super.setCamelContext(c);
         if (this.properties != null) {
@@ -1129,7 +1129,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
     public boolean isMtomEnabled() {
         return mtomEnabled;
     }
-    
+
     public String getPassword() {
         return password;
     }
@@ -1140,7 +1140,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
     public void setPassword(String password) {
         this.password = password;
     }
-    
+
     public String getUsername() {
         return username;
     }
@@ -1232,7 +1232,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
                     } else {
                         headerListOfRequestContxt.addAll(headerListOfPayload);
                     }
-                }             
+                }
             } else {
                 super.setParameters(params, message);
             }
@@ -1279,7 +1279,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
             return null;
         }
     }
-    
+
 
     public List<Interceptor<? extends Message>> getOutFaultInterceptors() {
         return outFault;
@@ -1312,7 +1312,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
     public void setOutFaultInterceptors(List<Interceptor<? extends Message>> interceptors) {
         outFault = interceptors;
     }
-    
+
     public void setFeatures(List<Feature> f) {
         features = f;
     }
@@ -1320,7 +1320,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
     public List<Feature> getFeatures() {
         return features;
     }
-    
+
     @SuppressWarnings("rawtypes")
     public void setHandlers(List<Handler> h) {
         handlers = h;
@@ -1330,7 +1330,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
     public List<Handler> getHandlers() {
         return handlers;
     }
-    
+
     public void setSchemaLocations(List<String> sc) {
         schemaLocations = sc;
     }
@@ -1346,7 +1346,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
     public void setTransportId(String transportId) {
         this.transportId = transportId;
     }
-    
+
     public String getBindingId() {
         return resolvePropertyPlaceholders(bindingId);
     }
@@ -1357,7 +1357,7 @@
public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
     public void setBindingId(String bindingId) {
         this.bindingId = bindingId;
     }
-    
+
     public BindingConfiguration getBindingConfig() {
         return bindingConfig;
     }
